<template>
  <div id="app">
    <header>
      <nav>
        <div class="logo">前端开发考核</div>
        <div class="nav-links">
          <router-link to="/">No1</router-link>
          <router-link to="/intermediate">No2</router-link>
          <router-link to="/advanced">No3</router-link>
        </div>
      </nav>
    </header>
    <main>
      <router-view/>
    </main>
    <footer>
      <p>© 2025 启明星前端开发考核</p>
    </footer>
  </div>
</template>

<style>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #333;
  background-color: #f5f7fa;
  line-height: 1.6;
}

#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #3498db;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a:hover {
  color: #3498db;
}

.nav-links a.router-link-exact-active {
  color: #3498db;
  border-bottom: 2px solid #3498db;
}

main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 2rem;
}

footer {
  background-color: #fff;
  padding: 1.5rem 0;
  text-align: center;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  color: #666;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .nav-links {
    width: 100%;
    justify-content: space-between;
  }
  
  main {
    margin: 1rem auto;
    padding: 0 1rem;
  }
}
</style>
